data Term = Add Term Term | Mult Term Term | Num Int

eval:: Term -> Term
eval t = Num (help t)

help::Term -> Int
help (Add t1 t2) = t1 +t2
help (Mult t1 t2) = t1 * t2
help (Num t) = t

transform::[Term]->[Term]
transform [] = []
transform (x:xs) 
		| eval x<0 = transform xs
		| otherwise = ((eval x):(transform xs))